#include<bits/stdc++.h>

using namespace std;

int main() {
    char s[100];
    cin >> s;
    char *p = s;
    char *q = p;
    while (*(q + 1))++q;
    bool ok = true;
    while (p < q) {
        if (*p != *q) {
            ok = false;
            break;
        }
        p++;
        q--;
    }
    cout << ok;

    return 0;
}
